Skip to content

refactor(agent): drop two verified-dead symbols (vulture, #1136) - #1286

Merged
axisrow merged 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-65/dead-code-agent
Jul 27, 2026
Merged

refactor(agent): drop two verified-dead symbols (vulture, #1136)#1286
axisrow merged 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-65/dead-code-agent

Conversation

@axisrow

@axisrow axisrow commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Part of #1136 (vulture axis of epic #1130). Two symbols deleted; each verified dead across all five surfaces (FastAPI/Web/CLI/agent/TUI) before removal. Per #1136, "dead by graph" ≠ "unneeded" — so every candidate below passed a full grep + git-history check before deletion.

Deletions

1. src/agent/tools/_registry.pyrequire_args() (8 lines)

  • Repo-wide grep (src/ tests/ scripts/ docs/ conftest.py, across .py/.txt/.md/.rst): exactly 1 hit — the definition. No string references, no __all__ export, no wildcard import of _registry (the repo has zero import \* statements), no getattr dispatch by that name.
  • git history: born in refactor(agent): add shared tool context helpers #534 (refactor sharing tool-context helpers) already without a caller or testgit show 0fdae381 | grep -c require_args → 1 (definition only). Dead since birth.
  • Five surfaces: it's a private helper inside the agent-tool registry; tools are reached via the registry, never via this function.

2. src/agent/provider_registry.pyZAI_BASE_URL_REQUIRED_HINT constant (5 lines)

Verification (no regression guard possible — code is gone, so proof = green suite + this note)

  • ruff check src/agent/tools/_registry.py src/agent/provider_registry.py — clean.
  • python -c "import src.agent.tools._registry, src.agent.provider_registry" — OK.
  • Full suite (pytest tests/ -m "not aiosqlite_serial" -n auto then -m aiosqlite_serial) — green (the only unrelated failures are pre-existing on origin/main: tests/test_quality_scoring_service.py and the xdist-flaky tests/routes/test_debug_routes.py::test_debug_timing_page; both deselected and reproduced on clean main).

Not deleted in this PR (doubtful → left for owner decision)

Part of #1136 / #1130.

Removes two symbols flagged by vulture and verified dead across all five
surfaces (FastAPI/Web/CLI/agent/TUI):

1. src/agent/tools/_registry.py — require_args()
   - Repo-wide grep (src/ tests/ scripts/ docs/ conftest.py, .py/.txt/.md/.rst):
     exactly 1 hit — the definition. No string references, no __all__, no
     wildcard import of _registry (repo has zero `import \*`), no getattr
     dispatch by that name.
   - git history: born in #534 (refactor sharing tool-context helpers) already
     WITHOUT a caller or test (git show 0fdae38 | grep -c require_args -> 1).
     Dead since birth.

2. src/agent/provider_registry.py — ZAI_BASE_URL_REQUIRED_HINT constant
   - Repo-wide grep: 1 hit — the definition. Hint text not duplicated
     anywhere.
   - git history: born used in #528 (Z.AI Coding Plan: _init_error, return,
     raise). Last consumer removed in #535 (canonicalize provider metadata);
     git grep ZAI_BASE_URL_REQUIRED_HINT f49ce42 -> definition only.
   - Sibling ZAI_* constants (GENERAL/CODING/DEFAULT_BASE_URL, LEGACY set)
     remain — they are used.

Part of #1136 / #1130.

Co-Authored-By: Claude <noreply@anthropic.com>
@axisrow
axisrow force-pushed the ao/tg_content_factory_5863f66be3-65/dead-code-agent branch from 09a1a48 to 1c2394c Compare July 27, 2026 14:43
@axisrow

axisrow commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

🔍 Local review (cycle 1)

Reviewed locally (/review + Codex companion sol/xhigh), no bots pinged. Rebased onto fresh main (5300114) → head 1c2394c.

Both reviewers: clean — 0 findings, Codex verdict approve.

Step 1.5 (dead-code re-verification on fresh main):

Codex ran an exact + fuzzy scan across tracked/ignored/generated/config/docs/tests/packaging files — no wildcard import, reflective lookup, entry point, plugin loader, MCP registry, or compat export resolves either deleted name. Collected 10,283 tests, ruff clean, all 5 surfaces import + app assembly succeeded.

No FIX, no UNVERIFIED → final cycle, no cleanup pass needed (no accumulated minors). Local mode does not merge — merge is yours to trigger.

@axisrow
axisrow merged commit 2277a4e into main Jul 27, 2026
4 checks passed
@axisrow
axisrow deleted the ao/tg_content_factory_5863f66be3-65/dead-code-agent branch July 27, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant